package com.unimas.action;

import javax.servlet.http.HttpServletRequest;

import com.unimas.bean.User;
import com.unimas.dof.converter.Converter;

public class UserConverter implements Converter {

	public Object convert(Class type, String paramName, HttpServletRequest request) {
		User user = new User();
		int id = Integer.parseInt(request.getParameter("id"));
		user.setId(id);
		user.setName(request.getParameter("name"));
		user.setEmail(request.getParameter("email"));
		return user;
	}

}
